<script type='text/javascript'>

function next_voice(){ //下一首
	var url = "{:fun('content@next_url',$info,'list')}";
	if(url!=""){
		window.location.href = url+"#miao";
	}else{
		layer.alert('全部播放完了!');
	}
}
function prev_voice(){ //上一首
	var url = "{:fun('content@prev_url',$info,'list')}";
	if(url!=""){
		window.location.href = url+"#miao";
	}else{
		layer.alert('到尽头了!');
	}
}

function change_play(index,obj){	//切换哪一首
	layer.msg("请稍候,音频加载中...");
	clarity.paythis(index)
	$(".more_list a").removeClass('choose');
	obj.addClass('choose');
}

var play_index = 0;	//当前播放哪一首

function now_play_voice(index){	//当前正在播放第几首
	play_index = index;
	$(".more_list a").removeClass('choose');
	$(".more_list a").eq(index).addClass('choose');

//	setTimeout(function(){
//		play_log(play_index,3);//播放记录
//	}, 3000 );
}


//var remind_pay = true;

//检查是否需要付费
//window.setInterval(function(){
//	var playtime = $('.jp-current-time').html().replace(':','.');
	//console.error('error'+playtime);
//	if(url_money[play_index]>0 && playtime>1){	//playtime>1只能试听一分钟
//		clarity.pause();
//		if(remind_pay==true){
//			remind_pay = false;
//			layer.confirm("需要支付 "+url_money[play_index]+" 元,才能继续播放,你还要继续吗?",{btn:['继续','放弃'],title:false,cancel:function(){}},function(){
//				pay_money(url_money[play_index],play_index)
//			},function(){});
//		}
//	}
//},2000);


function player_stop(){
	clarity.pause();
}

function player_start(){
	clarity.play();
}


</script>